<template>
  <el-form :size="config.size" :label-position="config.labelPosition" label-width="80px" :model="formConfig">
    <el-row :gutter="config.gutter || 0">
      <el-col :span="config.colSpan || 24" v-for="item in config.formList" :key="item.key">
        <FormItem :config="item" :form="formConfig"></FormItem>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
import FormItem from '@/components/FormItem'
export default {
  components: { FormItem },
  props: {
    formConfig: {
      type: Object,
    },
    config: {
      type: Object,
      default: () => ({
        size: 'mini',
        // labelPosition: 'left'
      })
    }
  },
  data() {
    return {}
  },
  computed: {
    configFn() {
      console.log(36, this.config);
      return this.config
    },
  },
  created() {
    console.log(37, this.formConfig);
  },
  methods: {

  },
}
</script>

<style scoped lang="scss"></style>